package com.evola.audit.model {
	import com.evola.audit.util.AuditDataObject;

	public class AuditItem {

		public var authorId : String;
		public var authorName : String;
		public var time : Date;
		public var action : String;
		public var object : String;
		public var objectId : String;
		public var shortLog : String;
		public var detailedLog : String;

		public function AuditItem(ao : AuditDataObject) {

			authorId = ao.authorId;
			authorName = ao.authorName;
			time = ao.time;
			action = ao.action;
			object = ao.object;
			objectId = ao.objectId;
			shortLog = ao.shortLog;
			detailedLog = ao.detailedLog;
		}

		public function toAuditDataObject() : AuditDataObject {

			var ao : AuditDataObject = new AuditDataObject();
			ao.authorId = authorId;
			ao.authorName = authorName;
			ao.time = time;
			ao.action = action;
			ao.object = object;
			ao.objectId = objectId;
			ao.shortLog = shortLog;
			ao.detailedLog = detailedLog;
			
			return ao;
		}
	}
}
